<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta http-equiv="Cache-Control" content="max-age=604800">
  <meta name="referrer" content="strict-origin-when-cross-origin">
  <title>
{%- if page.layout == 'home' -%}
  {{site.title}}
{%- else -%}
  {{page.title}}{{ site.separater | default: ' - '}}{{site.title}}
{%- endif -%}
  </title>
<!--
  <script type="text/javascript" src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
-->
  <script>
    let htmlClass = 'js-enabled js-loading';
    if ( typeof Symbol != "undefined" ) {
      htmlClass += ' js-es6';
    }
    document.documentElement.className = htmlClass;
    window.onerror = function () {
      document.documentElement.className += ' js-error';
    };
  </script>
  <script type="module">
    document.documentElement.className += ' js-module';
  </script>

  <link rel="shortcut icon" href="/akdata/favicon.ico">

{%- for url in site.data.config.css -%}
  {% if url contains "://" %}
    {% assign disturl = url %}
  {% else %}
    {% assign disturl = url | relative_url %}
  {% endif %}
  <link href="{{disturl}}" type="text/css" rel="stylesheet">
{%- endfor -%}

{%- for url in site.data.config.js -%}
  {% if url contains "://" %}
    {% assign disturl = url %}
  {% else %}
    {% assign disturl = url | relative_url %}
  {% endif %}
  <script src="{{disturl}}" type="text/javascript" ></script>
{%- endfor -%}

{%- for url in site.data.config.modules -%}
  {% if url contains "://" %}
    {% assign disturl = url %}
  {% else %}
    {% assign disturl = url | relative_url %}
  {% endif %}
  <script src="{{disturl}}" type="module" ></script>
{%- endfor -%}

{%- if page.withcss == true -%}
  {%- assign pageName = page.url | split: "/" | last -%}
  <link href="{{site.baseurl}}/{{pageName}}.css" type="text/css" rel="stylesheet">
{% elsif page.withcss %}
  <link href="{{site.baseurl}}/{{page.withcss}}" type="text/css" rel="stylesheet">
{%- endif -%}

{%- if page.withjs == true -%}
  {%- assign pageName = page.url | split: "/" | last -%}
  <script src="{{site.baseurl}}/{{pageName}}.js" type="module" ></script>
{% elsif page.withjs %}
  <script src="{{site.baseurl}}/{{page.withjs}}" type="module" ></script>
{%- endif %}

  <script type="text/javascript" >
    const siteInfo = {
      title : "{{ site.title }}",
      baseurl : "{{ site.baseurl }}",
      url : "{{ site.url }}",
      separater : "{{ site.separater }}",
    };
    const pageInfo = {
      title : "{{page.title}}",
      layout: "{{page.layout}}",
      url: "{{page.url}}",
      date: "{{page.date}}",
      id: "{{page.id}}",
      name: "{{page.name}}",
      collection: "{{page.collection}}",
      category: "{{page.category}}",
      dir: "{{page.dir}}"
    };
  </script>
{{site.tags.TAG}}
</head>
